﻿using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace ThunderboltCustomControlLibrary;

public class MultipleClickButton:Button
{
	public static readonly DependencyProperty AdditionalIconProperty = DependencyProperty.Register("AdditionalIcon", typeof(Geometry), typeof(MultipleClickButton), new PropertyMetadata(null));
	public static readonly DependencyProperty IconSizeProperty = DependencyProperty.Register("IconSize", typeof(double), typeof(MultipleClickButton), new PropertyMetadata(12D));

	static MultipleClickButton()
	{
		DefaultStyleKeyProperty.OverrideMetadata(typeof(MultipleClickButton), new FrameworkPropertyMetadata(typeof(MultipleClickButton)));
	}

	//要表示多个图标，这里要用List<Path>而不是List<Geometry>
	//但是Path对象创建不熟悉
	[Description("Gets or sets the additional icon path data")]
	[Category("Common Properties")]
	public Geometry AdditionalIcon
	{
		get { return (Geometry)GetValue(AdditionalIconProperty); }
		set { SetValue(AdditionalIconProperty, value); }
	}
	
	/// <summary>
	///获取或设置icon图标的高和宽。
	/// </summary>       
	[Description("Gets or sets the height and width of the icon icon")]
	[Category("Common Properties")]
	public double IconSize
	{
		get { return (double)GetValue(IconSizeProperty); }
		set { SetValue(IconSizeProperty, value); }
	}
	//todo:点击事件分类是按钮还是图标
}